<table id="accountrecordss_list" class="easyui-datagrid"
       fit="true" border="false"
       singleSelect="true" fitColumns="true" pagination="true" toolbar="#toolbar_accountrecordss"
       idField="accountrecordss_id" url="y.php?r=accountrecordss/getdata">
    <thead>
    <tr>
        <th field="title" width="60">主题</th>
        <th field="customer" width="60">客户</th>
        <th field="contacter" width="60">联系人</th>
        <th field="start_date" width="60">服务时间</th>
        <th field="serviceitem" width="60">服务项目</th>
        <th field="feedback" width="60">客户反馈</th>
    </tr>
    </thead>
</table>
<div id="toolbar_accountrecordss">
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="loadWin('添加客户服务','y.php?r=accountrecordss/showedit&accountrecordss_id=0')" /a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="accountrecordss_showedit()"/a>
</div>
<script>
    function accountrecordss_showedit() {
        //获取选中的列
        var selected = $("#accountrecordss_list").datagrid("getSelected");
        if(selected==null){
            alert('请选择行！');
        }else{
            //进行编辑操作
            loadWin('添加客户服务','y.php?r=accountrecordss/showedit&accountrecordss_id='+selected.accountrecordss_id);
        }
    }
</script>
